package net.gzw1993.runmate.utils;

import android.content.Context;
import com.lidroid.xutils.BitmapUtils;

import net.gzw1993.runmate.R;

/**
 * Created by Administrator on 15-8-13.
 */
public class MyBitmapUtilsHelper {
    private Context context;
    private static MyBitmapUtilsHelper helper;
    private BitmapUtils bitmapUtils;

    public MyBitmapUtilsHelper(){
    }

    public void init(Context context){
        this.context = context;
    }

    public static MyBitmapUtilsHelper getInstance() {
        if(helper == null){
            helper = new MyBitmapUtilsHelper();
        }
        return helper;
    }

    public BitmapUtils getBitmapUtils(){
        bitmapUtils = new BitmapUtils(context);
        return bitmapUtils;
    }

    public void setBitmapDefaultImage(){
        // TODO: 15-8-17  更换默认图标配置处
        bitmapUtils.configDefaultLoadingImage(R.mipmap.ic_launcher);
        bitmapUtils.configDefaultLoadFailedImage(R.mipmap.ic_launcher);
    }
}
